// $Id: clock.cpp 63 2004-10-22 14:33:20Z jonas $
#include "clock.h"
#include "loghandler.h"

const unsigned int Clock::m_secondsPerTimeStep = 10;

/**
 * Init the global clock to be at time step 0.
 */
Clock::Clock()
	: m_time(0)
{
}

/**
 * @todo Write documentation
 */
/*Clock::~Clock()
{
}*/

/**
 * Advance forward in time by one step. Also let the loggers know about this.
 */
void Clock::tick()
{
	LogHandler::getInstance()->clock_tick(m_time);
	m_time++;
}

/**
 * Tells the time.
 *
 * returns The current time step.
 */
unsigned int Clock::getTime()
{
	return m_time;
}
